from random import randint
# make char set
charset = ''
for i in range(0,26):
    charset += chr(ord('A')+i)
for i in range(0,26):
    charset += chr(ord('a')+i)
for i in range(0,10):
    charset += chr(ord('0')+i)
print charset

# n set
nset = [10,20,50,100,500,1000,1000]
# python name
pname = '_2n'

# make file
f = open('Longest_Palindromic_Substring.txt','w')
f.write('cd ~/Projects/a_python_practice/LongestPalindromicSubstring/\n\n')

for i in range(len(nset)):
    data_str = ''
    for j in range(nset[i]):
        data_str += charset[randint(0,len(charset)-1)]
    print data_str
    if i>0 :
        f.write('\n\n')
    f.write('python Longest_Palindromic_Substring'+pname+'.py\n')
    f.write(data_str)

# 'a'*1000
data_str = ''
for i in range(1000):
    data_str += 'a'
print data_str
f.write('\n\npython Longest_Palindromic_Substring'+pname+'.py\n')
f.write(data_str)
#
f.close()
